package com.hr.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;



@Controller
@RequestMapping("/page")
public class PageController {

    static Logger logger= LoggerFactory.getLogger(PageController.class);

    @RequestMapping("/{name}.html")
    public String toIndex(@PathVariable("name") String name,
                          Model model){
        //调试日志，一般你要查看程序运行过程中 参数等相关信息
        logger.debug("*** name:{}",name);
        //默认会拼接成这个样子 /templates/{name}.html
        return name;
    }

}
